// Created by wangliang on 2025/3/5.

import 'package:fk_user_agent/fk_user_agent.dart';

class UserAgentHelper {
  UserAgentHelper._();

  static final UserAgentHelper _instance = UserAgentHelper._();

  static UserAgentHelper get instance => _instance;

  void init() {
    FkUserAgent.init();
  }

  Future<String> getUserAgent() async {
    String? userAgent = await FkUserAgent.getPropertyAsync('userAgent');
    return userAgent ?? "";
  }

  Future<String> getWebViewUserAgent() async {
    String? webViewUserAgent =
        await FkUserAgent.getPropertyAsync('webViewUserAgent');
    return webViewUserAgent ?? "";
  }
}
